﻿using DiaoPaiDaYin;
using DXApplicationTangche.DTO.任务DTO;
using DXApplicationTangche.service;
using DXApplicationTangche.原型;
using System;
using System.Collections.Generic;
using System.Text;
using WorkflowCore.Interface;
using WorkflowCore.Models;
using static DXApplicationTangche.原型.TaskDTOS;

namespace WorkFlowConsoleApp
{
    /// <summary>
    /// 关于TaskDTO可执行的工作流
    /// </summary>
    public class TaskWorkflow : IWorkflow<TaskDTO>
    {
        public string Id => "打样";

        public int Version => 1;

        public void Build(IWorkflowBuilder<TaskDTO> builder)
        {
            builder
                .StartWith<启动打样任务WorkFlow>()
                .Then<启动后续任务WorkFlow>();
        }

        public class 启动打样任务WorkFlow : StepBody
        {
            public override ExecutionResult Run(IStepExecutionContext context)
            {
                return ExecutionResult.Next();
            }
        }

        public class 启动后续任务WorkFlow : StepBody
        {
            public override ExecutionResult Run(IStepExecutionContext context)
            {
                return ExecutionResult.Next();
            }
        }
    }
}
